﻿using PollSystemService;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting.Web;
using System.Collections.Generic;

namespace TestServices
{
 
    [TestClass()]
    public class TestRest
    {


        private TestContext testContextInstance;

        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        internal virtual IPollService CreateIPollService()
        {
            // TODO: Instantiate an appropriate concrete class.
            IPollService target = null;
            return target;
        }

        /// <summary>
        ///A test for GetVotes
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Academy\\Documents\\Visual Studio 2010\\Projects\\.Net Essentiels\\Panayot Popov\\PollSystemService\\PollSystemService", "/")]
        [UrlToTest("http://localhost:1058/")]
        public void GetVotesTest()
        {
            IPollService target = CreateIPollService(); // TODO: Initialize to an appropriate value
            Vote vote = null; // TODO: Initialize to an appropriate value
            IEnumerable<AnswerDTO> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<AnswerDTO> actual;
            actual = target.GetVotes(vote);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetPolls
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Academy\\Documents\\Visual Studio 2010\\Projects\\.Net Essentiels\\Panayot Popov\\PollSystemService\\PollSystemService", "/")]
        [UrlToTest("http://localhost:1058/")]
        public void GetPollsTest()
        {
            IPollService target = CreateIPollService(); // TODO: Initialize to an appropriate value
            IEnumerable<PollDTO> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<PollDTO> actual;
            actual = target.GetPolls();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
